package text.ui;

import java.io.*;
import org.xml.sax.*;

public class SimpleErrorHandler implements ErrorHandler
{
	public void error (SAXParseException e) throws SAXException
	{
		File file = new File (e.getSystemId());
		System.err.println("Error committed: " + file.getPath() + " in line : " + e.getLineNumber() + " about: " + e);
	}
	
	public void fatalError (SAXParseException e) throws SAXException
	{
		File file = new File(e.getSystemId());
		System.err.println("Fatal Error committed: " + file.getName() + " in line : " + e.getLineNumber() + " about: " + e);
	}
	
	public void warning (SAXParseException e) throws SAXException
	{
		File file = new File(e.getSystemId());
		System.err.println("Warning: " + file.getName() + " in line : " + e.getLineNumber() + " about: " + e);
	}
}
